import ThirdLayout from "~/layout/ThirdLayout";

export const ENTERPRISE_DETAILS = "enterprise-details";
export const VALID_LICENSE = "valid-license";
export const DESIGN_RESOURCES = "design-resource";
export const METEOROLOGICAL_HYDROLOGICAL = "meteorological-hydrological";

// 企业信息
export const ENTERPRISE_INFO = "enterprise-info";

// 有效证照
export const ENTERPRISE_LICENCE = "enterprise-licence";
export const PERSONAL_LICENCE = "personal-licence";

// 设计资料
export const DESIGN_RESOURCE_BODY = "design-resource-body";
export const CONSTRUCTION_INFORMATION = "construction-information";
export const RUNNING_RESOURCE = "running-resource";

export const HISTORY_DATA = "meteorological-history-data";

const routers = [
    {
        path: ENTERPRISE_DETAILS,
        name: ENTERPRISE_DETAILS,
        component: ThirdLayout,
        redirect: {
            name: ENTERPRISE_INFO,
        },
        children: [
            {
                path: ENTERPRISE_INFO,
                name: ENTERPRISE_INFO,
                component: () => import('~/views/basic-information/enterprise-status/EnterpriseInfo'),
                meta: {
                    label: '企业状况',
                }
            }
        ],
        meta: {
            icon: 'icon-list',
            label: '基本信息',
            hasThird: true,
        }
    },{
        path: VALID_LICENSE,
        name: VALID_LICENSE,
        component: ThirdLayout,
        redirect: { name: ENTERPRISE_LICENCE },
        meta: {
            icon: 'icon-id-card',
            label: '有效证照',
            hasThird: true,
        },
        children: [
            {
                path: ENTERPRISE_LICENCE,
                name: ENTERPRISE_LICENCE,
                component: () => import('~/views/basic-information/vaild-license/EnterpriseLicence'),
                meta: {
                    label: '企业合法证照',
                }
            },{
                path: PERSONAL_LICENCE,
                name: PERSONAL_LICENCE,
                component: () => import('~/views/basic-information/vaild-license/PersonalLicence'),
                meta: {
                    label: '考核合格证照',
                }
            },
        ],
    },{
        path: DESIGN_RESOURCES,
        name: DESIGN_RESOURCES,
        component: ThirdLayout,
        redirect: { name: DESIGN_RESOURCE_BODY },
        meta: {
            icon: 'icon-note',
            label: '设计资料',
            hasThird: true,
        },
        children: [
            {
                path: DESIGN_RESOURCE_BODY,
                name: DESIGN_RESOURCE_BODY,
                component: () => import('~/views/basic-information/design-resources/DesignResourceBody'),
                meta: {
                    label: '设计资料',
                }
            },{
                path: CONSTRUCTION_INFORMATION,
                name: CONSTRUCTION_INFORMATION,
                component: () => import('~/views/basic-information/design-resources/ConstructionInformation'),
                meta: {
                    label: '施工资料',
                }
            },{
                path: RUNNING_RESOURCE,
                name: RUNNING_RESOURCE,
                component: () => import('~/views/basic-information/design-resources/RunningResource'),
                meta: {
                    label: '运行资料',
                }
            },
        ]
    },{
        path: METEOROLOGICAL_HYDROLOGICAL,
        name: METEOROLOGICAL_HYDROLOGICAL,
        component: ThirdLayout,
        redirect: { name: HISTORY_DATA },
        meta: {
            icon: 'icon-rain',
            label: '气象水文资料',
            hasThird: true
        },
        children: [
            {
                path: HISTORY_DATA,
                name: HISTORY_DATA,
                component: () => import('~/views/basic-information/meteorological-hydrological/HistoryData'),
                meta: {
                    label: '历史气象资料',
                }
            }
        ]
    }
];

export default routers;
